package sctu.edu.java.year2016.team08.chenruixiu.day20160531.chapter9_1;
import java.util.Scanner;
/**编写Java程序，创建一个类，并在类中创建一个成员类不类通过成员类不类计算1到任意数的和的操作，并在外部类中进行测
 * Created by Administrator on 2016/6/2.
 */
public class OuterClass {
    private  class InnerClass {
        private void eating(){
            Scanner input = new Scanner(System.in);
            int score = input.nextInt();
            int sum =0;


            for(int i = 1;i<=score;i++){
                sum = sum + i;

            }

            System.out.println(sum);
        }


    }
    public static void main(String[] args) {

        OuterClass out = new OuterClass();
        OuterClass.InnerClass in = out.new InnerClass();

        in.eating();
    }
}
